<script type="text/javascript" src="${script}jquery.jmodal.js"></script>
<link rel="stylesheet" type="text/css" href="${css}jquery.jmodal.css" />
<script type="text/javascript">
$(document).ready(function(){
	$('#upForm').attr('action',BaseJs.action('system/UploadFile'));
	$('#openDialog').click(function(){
		$('#attchFile').show();
		$.fn.jmodal({
			title:'上传文件窗口',
			content:$('#attchFile').append($('#attchList')),
        	okEvent:function(e){
        		$('#attch').after("<span id='attchList'></span>")
        		$('#attchList').html($('p.files'));
          	}
        });
	});
});
function download(val){
	window.open(BaseJs.toAction('system/Download?id='+val),'_self');
}
function delete(val){
	$.urlAjax(BaseJs.toAction('system/UploadFile!delete?id='+val),function(){
		$('p.files [val='+val+']').remove();
	});
}
</script>
<div id='attchFile' style='display:none;'>
	<form id="upForm" method="POST" enctype="multipart/form-data">
		<span><input type="file" id="uploadFile" name="file" /><input type="button" id="btnUpload" val="160" value="上传" /></span>
	</form>
</div>
<img src="${webroot}common/images/optImg/attach.png" id="openDialog" />